/*
 * MainWindow.h
 *
 *  Created on: 01.04.2009
 *      Author: Konan Andrej
 */

#ifndef MAINWINDOW_H_
#define MAINWINDOW_H_

#include "DataBaseWindow.h"
#include "StockTableView.h"
#include "dbms.h"

#include <QMainWindow>

#include <QHBoxLayout>
#include <QPushButton>
#include <QStatusBar>
#include <QTableView>
#include <QToolBar>
#include <QMenuBar>
#include <QAction>
#include <QLocale>
#include <QDialog>
#include <QMenu>

class MainWindow : public QMainWindow
{
	Q_OBJECT

public:
	MainWindow();

private:
	QPushButton btn;

	DataBaseWindow* DBDialog;

	//Dtabase hold only one database at current time
	//DataBase* DB;
	DBMS* dbms;

	//TableView
	StockTableView* DBTable;

	//StatusBar labels
	QLabel *statusBarLabel;

	//MainMenu
	QMenu *fileMenu;
	QMenu *databaseMenu;
	//ToolBar
	QToolBar *fileToolBar;

	//Database actions
	QAction *editDatabaseAction;
	QAction *editEventsAction;
	//File actions
	QAction *newMaterialsAction;
	QAction *newOrderAction;
	QAction *printAction;
	QAction *exitAction;

	void createActions();
	void createMenus();
	void createToolBars();
	void createStausBar();

private slots:
	void dial();
};

#endif /* MAINWINDOW_H_ */
